const mutations = {
    // 设置用户信息
    SET_userInfo(state, result) {
        state.userInfo = result
    },
    // 保存用户信息
    SET_saveUserInfo(state, result) {
        state.saveUserInfo = result
    },
    // 设置页码
    SET_page(state, result) {
        state.page = result
    },
    // 设置每页显示课程数目
    SET_pageSize(state, result) {
        state.pageSize = result
    },
    // 设置总的课程表条数
    SET_totalPage(state, result) {
        state.totalPage = result
    },
    SET_courseTag(state, result) {
        state.courseTag = result
    },
    // --------------
    // 保存课程表信息
    SET_courseList(state, result) {
        state.courseList = result
    },
    // 保存所有课程分类列表
    SET_allCategoryList(state, result) {
        state.allCategoryList = result
        // console.table('来自store得信息' + state.allCompanyList)
    },
    SET_allCategoryList_ByIndex(state, params) {
        // console.log(params.index, params.value)
        state.allCategoryList[params.index].categoryName = params.value
    },
    // 设置临时课程分类id
    SET_tempCategoryId(state, params) {
        console.log('+-+')
        console.log(params.index)
        console.table(state.allCategoryList[params.index])
        state.tempCategoryId = state.allCategoryList[params.index].categoryId
        state.tempCategoryName = state.allCategoryList[params.index].categoryName
        console.log(state.tempCategoryId)
        console.log(state.tempCategoryName)
    },
    // 设置临时课程分类id
    SET_tempCategoryId_ByDel(state, params) {
        console.table(params)
        // console.table(state.allCompanyList[params.index])
        state.tempCategoryId = state.allCategoryList[params].categoryId
        console.log('课程分类id: ' + state.tempCategoryId)
    },
    // 设置临时课程表id 用于删除
    SET_tempCourseListId(state, params) {
        console.log(params)
        state.tempCourseListId = state.courseList[params._index].courseId
        // console.log('ABC', state.courseList)
    },
    // 设置 编辑课程信息
    SET_editCourseMsg(state, params) {
        state.editCourseMsg.ORDER_NUMBER = params.ORDER_NUMBER
        state.editCourseMsg.CATEGORY = params.CATEGORY
        state.editCourseMsg.COURSE_NAME = params.COURSE_NAME
        state.editCourseMsg.COURSE_DESCRIPTION = params.COURSE_DESCRIPTION
        state.editCourseMsg.LESSON_PERIOD = params.LESSON_PERIOD
        state.editCourseMsg.PRICE = params.PRICE
        state.editCourseMsg.COURSE_LABLE = params.COURSE_LABLE
        state.editCourseMsg.DETAILS_LINK = params.DETAILS_LINK
    },
    // 保存当前课程名称
    SET_currentCategory(state, result) {
        console.log('current cat', result)
        state.currentCategory = result
    },
    // 保存上传服务器
    SET_uploadUrl(state, result) {
        state.uploadUrl = result
    },
    // 轮播图列表
    SET_shufflingList(state, result) {
        state.shufflingList = result
    },
    // 更新后的排序列表
    SET_updateSortList(state, result) {
        state.updateSortList = result
    },
    // 设置排序列表
    SET_sortList(state, result) {
        state.sortList = result
    },
    // 设置排序列表
    SET_sortCourseList(state, result) {
        state.sortCourseList = result
    },
    // 保存页面状态值
    SET_sportPage(state, result) {
        state.sportPage = result
    },
    SET_shufflingPage(state, result) {
        state.shufflingPage = result
    },
    // 设置标签列表
    SET_tagList(state, result) {
        state.tagList = result
    }
}
export default mutations
